package com.amos.isearch.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * DESCRIPTION: SkuRepository
 *
 * @author <a href="mailto:daoyuan0626@gmail.com">amos.wang</a>
 * @date 2021/1/24
 */
@Repository
public interface SkuRepository extends JpaRepository<Sku, String> {

    @Query(value = "select * from tb_sku order by id desc limit 10", nativeQuery = true)
    List<Sku> findTopById();

}
